import React from 'react'
interface PerosnProps{
     name:string;
     content?:React.ReactNode //jsx类型
 }
function Person(props:PerosnProps){
    return(
        <div>
        <h3>你好我是{props.name}</h3>
        {props.content}
        </div>
    )
}
const Animal:React.FC<PerosnProps>=(props)=>{
    return(
        <div>
            <h3>我是动物{props.name}</h3>
        </div>
    )
}

function App()
{
    return(
        
        <div>
            <h2>hello TS</h2>
            <Person name='康总'  content={<button>提交</button>}/>
            <Animal name={'旺财'} />
        </div>
    )

}
export default App